//赛题状态枚举组件
import {
    MinusCircleOutlined,
    CheckCircleOutlined,
} from '@ant-design/icons';
import { Tag } from 'antd';
const CompQuesStatusEnum = (statusData) => {
    if(statusData === undefined || statusData === null){
        statusData = 'UN_KNOWN';
    }
    const STATUS_MAP = {
        UN_KNOWN: {
            title: '未知',
            color: 'default',
            icon: <MinusCircleOutlined />
        },
        USED: { 
            title:'已使用',
            color: 'success',
            icon: <CheckCircleOutlined />, 
        },
        UNUSED: { 
            title:'未使用',
            color: 'blue',
            icon: <CheckCircleOutlined />, 
        }
    }
    return <div><Tag icon={STATUS_MAP[statusData].icon} color={STATUS_MAP[statusData].color}>{STATUS_MAP[statusData].title}</Tag></div>
}
export default CompQuesStatusEnum